package com.taritari.journal.controller;

import com.taritari.journal.services.MyMailService;
import com.taritari.journal.utils.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author taritari
 * @date 2024-01-12 17:21
 * @description
 */
@RestController
@Slf4j
@Tag(name = "邮件controller", description = "邮件controller")
@RequestMapping("/email")
public class EmailVailController {
    @Autowired
    private MyMailService myMailService;
    @GetMapping("/sendVerify")
    @Operation(summary = "发送验证码", description = "发送验证码")
    public Result sendEmail(@RequestParam String email,@RequestParam String opt){
        Result result = myMailService.sendMail(email,opt);
        return result;
    }
    @GetMapping("/sendWordCloud")
    @Operation(summary = "发送词云报告", description = "发送词云报告")
    public Result sendWordCloudReport(){
//        Result result = myMailService.sendWordCloudReport();
        return Result.success();
    }
}
